package com.beikbank;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;


@SpringBootApplication
@MapperScan(basePackages = {"com.beikbank.modules.*.dao"})
public class JobApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication app = new SpringApplication(JobApplication.class);
		app.run(args);
		System.err.println("sample started. http://localhost:8080/admin/list");
		System.err.println("sample run. http://localhost:8080/admin/run?jobIds=['3']");
		System.err.println("sample info. http://localhost:8080/admin/info/3");
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(JobApplication.class);
	}
}
